(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/scripts/mainScript.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'a9676PWFK9Ej5rL7Wj0KqOY', 'mainScript', __filename);
// scripts/mainScript.js

"use strict";

cc.Class({
    extends: cc.Component,

    properties: {
        gundong_label: {
            default: null,
            type: cc.Node
        },
        protbalPreftab: {
            default: null,
            type: cc.Prefab

        },
        createRoom: {
            default: null,
            type: cc.Prefab
        }
    },

    // LIFE-CYCLE CALLBACKS:


    buttonClick: function buttonClick(event, customData) {
        console.log(customData);
        if (customData == "join") {
            var node = cc.instantiate(this.protbalPreftab);
            node.parent = this.node;
        } else if (customData == "create") {
            var _node = cc.instantiate(this.createRoom);
            _node.parent = this.node;
        }
    },
    update: function update(dt) {
        this.gundong_label.position = cc.p(this.gundong_label.position.x - 1, this.gundong_label.position.y); //跑马灯 右面位置保持不变，左边依次-1
        if (this.gundong_label.position.x < -700) {
            this.gundong_label.position = cc.p(700, this.gundong_label.position.y);
        }
    }
});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=mainScript.js.map
        